#define MAX_LIGHTS 4
#define MAXBONES 29
float4x4 g_WorldViewProjectionMatrix : WORLD_VIEW_PROJECTION_MATRIX;
float4x4 g_WorldMatrix : WORLD_MATRIX;
float4x4 g_ViewMatrix : VIEW_MATRIX;
float4x4 g_ProjectionMatrix : PROJECTION_MATRIX;
float4x4 g_WorldViewMatrix : WORLD_VIEW_MATRIX;
float4x4 g_ViewProjectionMatrix : VIEW_PROJECTION_MATRIX;
float4x4 g_ViewToLightProjectionMatrix : VIEW_TO_LIGHT_PROJECTION_MATRIX;
float3x4 g_Bones[MAXBONES] : BONES;
float3   g_LightsPosition [MAX_LIGHTS]: LIGHTS_POSITION;
float3   g_LightsDirection[MAX_LIGHTS]: LIGHTS_DIRECTION;
float3   g_LightsColor[MAX_LIGHTS]: LIGHTS_COLOR;
bool     g_LightsEnabled[MAX_LIGHTS]: LIGHT_ENABLED;
int	 	 g_LightsType[MAX_LIGHTS]: LIGHTS_TYPE;
float	 g_LightsAngle[MAX_LIGHTS]: LIGHTS_ANGLE;
float	 g_LightsFallOff[MAX_LIGHTS]: LIGHTS_FALL_OFF;
float	 g_LightsStartRangeAttenuation[MAX_LIGHTS]: LIGHTS_START_RANGE_ATTENUATION;
float 	 g_LightsEndRangeAttenuation[MAX_LIGHTS]: LIGHTS_END_RANGE_ATTENUATION;
float	 g_LightsIntensity[MAX_LIGHTS]: LIGHTS_INTENSITY;
float3	 g_CameraPosition : CAMERA_POSITION;
float 	 g_Time : TIME;
float	 g_ScreenWidth: SCREEN_WIDTH;
float	 g_ScreenHeight: SCREEN_HEIGHT;

float4x4 g_InverseWorldMatrix : INVERSE_WORLD_MATRIX;
float4x4 g_InverseViewMatrix : INVERSE_VIEW_MATRIX;
float4x4 g_InverseProjectionMatrix : INVERSE_PROJECTION_MATRIX;

bool g_UseShadowMaskTextureParameter : USE_SHADOW_MASK_TEXTURE;
bool g_UseStaticShadowmapParameter :   USE_STATIC_SHADOWMAP;
bool g_UseDynamicShadowmapParameter :  USE_DYNAMIC_SHADOWMAP;	

#define SHADOW_EPSILON 0.00005f
